<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="model.Prevoznik"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<jsp:useBean id="user" class="model.User" scope="session" />
<jsp:useBean id="prevoznik" class="model.Prevoznik" scope="session" />
<jsp:useBean id="aliases" class="java.lang.String" scope="session" />
<jsp:useBean id="username" class="java.lang.String" scope="request" />
<jsp:useBean id="password" class="java.lang.String" scope="request" />

<html>
<head>
<title>Pregled podataka o prevozniku</title>
</head>
<body>

<h1>Pregled podataka o prevozniku</h1>
<br>
<%
	if (user != null && user.isLoggedIn() || !user.isAdmin()) {
%>

<table cellspacing=0 cellpadding=3 border=0>
	<!-- 
	<tr>
		<td align=right>Sifra:</td>
		<td><c:out value="${prevoznik.sifra.id}" /></td>
	</tr>
 -->
 	<tr>
		<td align=right>Username:</td>
		<td><c:out value="${username}" /></td>
	</tr>	
	
	<tr>
		<td align=right>Password:</td>
		<td><c:out value="${password}" /></td>
	</tr>

	<tr>
		<td align=right>Naziv:</td>
		<td><c:out value="${prevoznik.naziv}" /></td>
	</tr>
	
	<tr>
		<td align=right>Aliases:</td>
		<td><c:out value="${aliases}" /></td>
	</tr>

	<tr>
		<td align=right>Adresa:</td>
		<td><c:out value="${prevoznik.adresa}" /></td>
	</tr>

	<tr>
		<td align=right>Email:</td>
		<td><c:out value="${prevoznik.eMail}" /></td>
	</tr>

	<tr>
		<td align=right>Telefon:</td>
		<td><c:out value="${prevoznik.telefon}" /></td>
	</tr>

	<!-- dodajemo prazan red -->
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>

	<tr>
		<td align="right">Akcije:</td>
		<td><a href="/admin?changeCarrier=true&ID=${prevoznik.sifra.id}">Izmena</a></td>
	</tr>

	<tr>
		<td>&nbsp;</td>
		<td><a href="/admin?deleteCarrier=true&ID=${prevoznik.sifra.id}">Brisanje</a></td>
	</tr>


</table>

<%
	} else {
%>

<p>Niste se prijavili! <br>
<a href="/logIn">Logovanje</a></p>

<%
	}
%>

<p><a href="/admin">Red voznje</a> <br>
<a href="/logIn?logOff=true">Odjava</a></p>

</body>
</html>